<?php

function mtimer( $stime = null ) {
  if( !$stime ) {
    $stime = explode( ' ', microtime() );
    return $stime[0] + $stime[1];
  }

  $etimer = explode( ' ', microtime() );
  return ($etimer[1] + $etimer[0]) - $stime;
}

?>
